import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_demo/controllers/download_controller.dart';
import 'package:flutter_demo/controllers/user_controller.dart';
import 'package:flutter_demo/pages/home_page.dart';
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';

void main() async {
  await GetStorage.init();
  runApp(GetMaterialApp(
    home: const HomePage(),
    defaultTransition: Transition.cupertino,
    initialBinding: _InitialBinding(),
    locale: Get.deviceLocale,
    popGesture: true,
  ));


  SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
    statusBarColor: Colors.transparent, //全局设置透明
    statusBarIconBrightness: Brightness.light,
  ));
}

class _InitialBinding extends Bindings {
  @override
  void dependencies() {
    Get.put(UserController());
    Get.put(DownloadController());
  }
}
